﻿RDRAM Probe v1.0

  This tool was designed to read exposed values on each of the RDRAM modules the console can "see".
  The point of this is twofold.  Firstly, to help determine what remarked chips in later consoles actually are.  Secondly, as a sort of diagnostic tool to figure out what went wrong when installing on a board.

  This tool requires SRAM on-cart in order to save the results, both for display and for later use.  Surprise surprise, fiddling with hardware registers on the same rdram running your code is not the brightest of ideas, so alternate available memory needs to be used for this purpose.  Although a dmem version would be more portable, sram saves the step of jotting everything down on paper.  Values start at 0 in the file, and each field is 0x30 long, where the final word is padding.
  If you're using a flashcart that automatically sets the save type based on gameID, this one matches an existing SRAM title to save you maybe clicking a toggle or something.

  Use this tool on console.  Emulators don't emulate RDRAM at this low a level, and iQue uses different memory altogether.

  Up to 32 RDRAM unit entries will be displayed, although I suspect only 8 are supported.  This corresponds with the upper end of that block of memory and known stepping increments.  Display is naive, so for each multibank unit found you'll notice a false entry at the end of the list.  Use + right, c right, A, or R to advance pages, and + left, c left, B, or L to backtrack.

  Notes on specific displayed values (when known) are given in the following two sections:
*Top Field: RI Registers*
*Bottom Field: RDRAM Units*

+_+

*Top Field: RI Registers*
  These are copied in-state, so some values will change periodicly.  For the most part they're displayed because there happened to be enough room to print them to screen.
  From left to right, top to bottom:
A4700000	RI Mode
	00000003	operating mode
		0	reset
		1	all rdrams continuously active.  ONLY USE FOR DEBUG!
		2	standby (normal operating mode)
	00000004	stop active transmit	(automatic powerdown when idle)
		0	disabled.	ONLY FOR DEBUG USE!
		1	enabled (normal operating mode)
	00000008	stop active reciet
		0	disabled.	ONLY FOR DEBUG USE!
		1	enabled (normal operating mode)

A4700004	RI Config
	0000003F	current control input in manual current mode
	00000040	current control enable
		0	manual mode
		1	automatic

A4700008	RI Current Load
	Any write causes a new current control value to be loaded.

A470000C	RI Select
	00000001	enable transmit select
	00000004	enable receive select

A4700010	RI Refresh/Count
	000000FF	clean refresh delay
	0000FF00	dirty refresh delay
	00010000	refresh bank; toggled between refreshes
	00020000	refresh enable
		0	disabled
		1	refresh once each horz. retrace
	00040000	refresh optimize
		0	disabled
		1	enabled
	FFF80000	from right to left, flag set when multibank unit present during boot sequence

A4700014	RI Latency
	0000000F	maximum DMA latency; should only be lowered from 0xF if video mode demands it.

A4700018	RI Error
	00000001	nack error
	00000002	ack error
	00000004	set when exceeded memory limit
	Writing the register clears flags.

A470001C	RI Bank Status
	000000FF	???; right to left, maybe corresponding to number of units or mirroring multibank flags; 1F for 2 2MB, FF for 4 2MB.
	00000F00	???; some kind of state flags (maybe only combinations of 4 & 8?)

80000318	Reported RDRAM size from initialization
	Please note this value may not be accurate if a passthrough device was used!



*Bottom Field: RDRAM Units*
  RDRAM values are read once and stored to SRAM.  Changes in their state will not be observed for practical reasons.
  From left to right, top to bottom.
----	RegAddress
	Register address this unit is found at.

+000	Device Type
	Specifies configuration and size.  
	00100000	indicates a multibank (2MB) unit

+004	Deviceld
	Specifies the base address.  As an interesting note, some expansion paks report the same address for both units, also raising the mem limit exceeded flag in RI Error.

+008	Delay
	CAS delay values.

+00C	Mode
	Programmable output drive current.
	Some NEC units require this to be read more than once before it coughs up the current control value.

+014	RefRow
	Refresh row and bank address, mostly for diagnostic purposes.  To plagiarize:
	"The RefRow register contains read-write fields. It is used to keep track of the bank and row being refreshed.
	 Normally this register is only read or written for testing purposes. The fields are aliased in the following way:
	 RowField[7:1] equals RefRow[0][7:1]
	 RowField[9:8] equals RefRow[2][1:0]
	 BankField[3] equals RefRow[1][3]"

+018	RasInterval
	To plagiarize some more:
	"This register specifies RDRAM programmable RAS delay values. The RasInterval Register contains four writeonly fields.
	 When a rowmiss occurs, or when a row is being refreshed during a burst refresh operation, it is necessary for the control logic of an RDRAM to count the appropriate number of clock cycles (tCYCLE) for four intervals.
	 This is done with a counter which is loaded successively with three values from the RasInterval Register."

+01C	MinInterval
	Minimum values for three time intervals for framing packets in clock cycle units.

+020	AddressSelect
	Address mapping.  Either this value really is zero or there's some trick to reading it back.  Simply doubling up reads doesn't appear to work.  Any suggestions are welcome.

+024	DeviceManufacturer
	Self-explanitory.
	0x200	Toshiba
	0x500	NEC
	0xA00	LG?  Used in retro-bit remarked exp paks
	Honestly not certain if all 2MB units are Toshiba, regardless designation...

+200	Row
	Specifies RDRAM current sensed row in each bank.



-Zoinkity
